package tech.aistar.mapper.center;

import org.apache.ibatis.annotations.Select;
import tech.aistar.entity.RealName;

/**
 * Created by 23827 on 2019/10/11.
 */
public interface RealNameMapper {
    @Select("insert into real_name(user_id,sname,id_card,status) values(#{userId},#{sname},#{idCard},#{status})")
    void save(RealName realName);

    //根据id查所有
    @Select("select * from real_name where id = #{value}")
    RealName getById(Integer id);

    //通过user_id查询所有的
    @Select("select * from real_name where user_id = #{user_id}")
    RealName findByUserId(Integer user_id);
}
